package cc.rengu.redp.bizimpl.upmp.service;

import cc.rengu.igas.bomp.facade.BompMchntManageService;
import cc.rengu.igas.bomp.facade.BompMchntQueryService;
import cc.rengu.igas.bomp.facade.BompPublicQueryService;
import cc.rengu.igas.bomp.facade.bean.*;
import cc.rengu.igas.bomp.facade.request.MchntProdInfoManageRequest;
import cc.rengu.igas.bomp.facade.request.MchntProdInfoQueryRequest;
import cc.rengu.igas.bomp.facade.request.ProdInfoQueryRequest;
import cc.rengu.igas.bomp.facade.response.MchntProdInfoQueryResponse;
import cc.rengu.igas.bomp.facade.response.ProdInfoQueryResponse;
import cc.rengu.redp.bizimpl.enums.BompQueryTypeEnum;
import cc.rengu.redp.bizimpl.igas.bean.CompareDataBean;
import cc.rengu.redp.bizimpl.igas.vo.PTxnGroup;
import cc.rengu.redp.bizimpl.upmp.domain.UpmpBMchntProdInfo;
import cc.rengu.redp.bizimpl.upmp.vo.MchntProdManagerVO;
import cc.rengu.redp.bizimpl.upmp.vo.OperationResult;
import cc.rengu.redp.bizimpl.upmp.vo.UpmpUserInfoVO;
import cc.rengu.redp.common.exception.RedpException;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 刘玉亮.LL
 * @since 2021-06-22
 */
public interface IUpmpBMchntProdInfoService extends IService<UpmpBMchntProdInfo> {

    OperationResult mchntProdSave(String instId, MchntProdInfoManageRequest req, BompMchntManageService bompMchntManageService,
                                  IUpmpPrivilegeCheckService authPrivilegeCheckService, String traceNo, String optFlag, String manageOprType) throws RedpException;

    List<ProdInfoBean> getProdInfoList(String instId, UpmpUserInfoVO user, BompPublicQueryService bompQueryService, String traceNo) throws RedpException;

    ProdInfoQueryResponse getProdInfo(String instId, BompPublicQueryService bompQueryService, String traceNo, ProdInfoQueryRequest req) throws RedpException;

    List<BaseProdInfoBean> getBaseProdInfoList(String instId, UpmpUserInfoVO user, BompPublicQueryService bompQueryService, String traceNo) throws RedpException;

    List<MchntProdInfoBean> getMchntProdInfoList(String instId, UpmpUserInfoVO user, BompMchntQueryService bompQueryService, String traceNo, String mchntNo, BompQueryTypeEnum queryType) throws RedpException;

    MchntProdInfoQueryResponse getMchntProdInfoDtl(String instId, BompMchntQueryService bompQueryService, String traceNo, MchntProdInfoQueryRequest req, BompQueryTypeEnum queryType) throws RedpException;

    CompareDataBean getProdCompareFileById(List<MchntProdInfoBean> tmps, List<MchntProdInfoBean> formals) throws RedpException;

    CompareDataBean getAuthCompareFileById(List<MchntAuthCtrlInfoBean> tmps, List<MchntAuthCtrlInfoBean> formals) throws RedpException;

    CompareDataBean getStageCompareFileById(List<MchntStageInfoBean> tmps, List<MchntStageInfoBean> formals) throws RedpException;

    CompareDataBean getTxnGroupCompareFileById(List<PTxnGroup> tmps, List<PTxnGroup> formals) throws RedpException;

    List<PTxnGroup> getTxnGroup(List<MchntAuthCtrlInfoBean> txnGroupList, List<MchntAuthCtrlInfoBean> mchntAuthCtrlList, Map<String, String> map, String instId, String prodCode);

    List<PTxnGroup> getBProdAuthCtrlTxnGroup(List<ProdAuthCtrlBean> selectedTxnNums, List<ProdAuthCtrlBean> txnGroupList, Map<String, String> map, String instId, String prodCode);

    void getMchntProdFromProd(ProdInfoQueryResponse prodInfoResp, MchntProdInfoQueryResponse mchntProdResp, String baseProdCode);

    void getMchntAuthCtrlFromProd(ProdInfoQueryResponse prodInfoResp, MchntProdInfoQueryResponse mchntProdResp);

    void getMchntProdManageFromVO(MchntProdInfoManageRequest req, MchntProdManagerVO bProdInfo) throws RedpException;
}
